		<html>
			<head>
				<title>Data Insertion and retreival</title>
			</head>
			<body>
				
				<h1 align='center'>Updated table</h1>
				<h2 align='center'>Employee Details</h2>
				<div align="center">
					<a href="insert.php"><button style="font-size:1.2em">Insert</button></a>
				</div>
					<br/>							
				<table border=1 align='center' cellspacing=1 cellpadding=6>
				<tr align='left'> <th>Name</th> <th>Age</th> <th>Occupation</th> <th>Address</th> <th>Status</th> <th>Delete</th> </tr>
				
				<?php
					$connection = mysql_connect('cmm.local','training','train@CMM') or die("Server not connected".mysql_error());
					$database = mysql_select_db('training') or die("database not selected".mysql_error());
					$qry=mysql_query("select * from shine_employ");
					$num_of_rows= mysql_num_rows($qry);
						for($i=1;$i<=$num_of_rows;$i++)
						{
							$row=mysql_fetch_array($qry);
						
				?>
					<form name="frmm<?php echo $i ?>" id="frmm<?php echo $i ?>" action="#" method="get">
					<tr>
					<input type="hidden" value="<?php echo $row[0] ?>" name="emp_id">
					<td id='nam<?php echo $i ?>'><?php echo $row[1] ?></td>
					<td id='age<?php echo $i ?>'><?php echo $row[2] ?></td>
					<td id='occup<?php echo $i ?>'><?php echo $row[3] ?></td>
					<td id='addr<?php echo $i ?>'><?php echo $row[4] ?></td>
					<td id='stat<?php echo $i ?>'><?php echo $row[5] ?></td>
					<td style="text-align:center">
						<a href="edit.php?action=delete&id=<?php echo $row[0];?>"> <img src='b_drop.png' /></a>
						&nbsp;&nbsp;
						<a href="edit.php?action=edit&id=<?php echo $row[0];?>"> <img src='b_edit.png' /></a>
					</td>
					</tr>
					</form>
				<?php 
						}
				?>

				</table>
			</body>
		</html>
				
			


<script type="text/javascript">

</script>

<style type="text/css">
	th
		{
			text-transform:uppercase;
			color:white;
			background-color:rgb(42,42,42);
			text-align:center;
			
		}

	table
		{
			border-collapse:collapse;
			border:2px solid rgb(42,42,42);
			outline:4px solid grey;
		}

	td
		{
			border:2px solid rgb(42,42,42);
			text-transform:capitalize;
		}
	tr:hover
		{
			background-color:lightgrey;
		}

	a,img{text-decoration:none;border:0px}

</style>

<?php


